package com.ctshk.rpc.finance.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ctshk.rpc.finance.base.CustomBaseMapper;
import com.ctshk.rpc.finance.entity.FinanceSpecialCollectionSource;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 * 特殊收款来源信息 Mapper 接口
 * </p>
 *
 * @author 叶冠峰
 * @since 2021-04-05
 */
public interface FinanceSpecialCollectionSourceMapper extends CustomBaseMapper<FinanceSpecialCollectionSource> {

    /**
     * 批量删除明细
     * @param id
     * @param userId
     * @return
     */
    @Update("UPDATE t_finance_special_collection_source\n" +
            "SET is_deleted = 1,modified_id = #{user_id}\n" +
            "WHERE collection_id = #{collection_id} AND is_deleted = 0")
    Integer delByCollection(@Param("collection_id") Long id, @Param("user_id") Long userId);
}
